home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / nt / emacssrc.zip / EMACSSRC.TAR / emacs-19.17 / src / sysfdset.h < prev    next >
C/C++ Source or Header  |  1993-10-13  |  680b  |  26 lines

  1. #ifndef __SYSFDSET_H__
  2. #define __SYSFDSET_H__
  3.  
  4. #ifdef FD_SET
  5. /* We could get this from param.h, but better not to depend on finding that.
  6.    And better not to risk that it might define other symbols used in this
  7.    file.  */
  8. #ifdef FD_SETSIZE
  9. #define MAXDESC FD_SETSIZE
  10. #else
  11. #define MAXDESC 64
  12. #endif
  13. #define SELECT_TYPE fd_set
  14. #else /* no FD_SET */
  15. #define MAXDESC 32
  16. #define SELECT_TYPE int
  17.  
  18. /* Define the macros to access a single-int bitmap of descriptors.  */
  19. #define FD_SET(n, p) (*(p) |= (1 << (n)))
  20. #define FD_CLR(n, p) (*(p) &= ~(1 << (n)))
  21. #define FD_ISSET(n, p) (*(p) & (1 << (n)))
  22. #define FD_ZERO(p) (*(p) = 0)
  23. #endif /* no FD_SET */
  24.  
  25. #endif
  26.